package com.lz.sports.api

import com.lz.comm.net.HttpResult
import com.lz.sports.bean.HttpCheckResult
import kotlinx.coroutines.flow.Flow
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.Call
import retrofit2.http.*


interface UploadApi {

    //单个上传
    @POST("/common/upload")
    @Multipart
    fun upload(@Part part: MultipartBody.Part): Flow<HttpResult<String?>>

    //服务器检测
    @GET("/common/onLineStatus")
    fun lineStatus(): Flow<HttpCheckResult>

    //批量上传
    @POST("/common/upload/zip")
    @Multipart
    fun uploads(@Part part: MultipartBody.Part, @Part("uploadEnum")uploadEnum: RequestBody): Call<HttpResult<String?>>

    //检录校验
    @POST("/exam/register/check")
    fun inspect(@Body body: RequestBody): Call<HttpResult<String?>>

    //签到
    @POST("/exam/register")
    fun signIn(@Body body: RequestBody): Call<HttpResult<String?>>

    //考试记录
    @POST("/exam/history/grade")
    fun examinee(@Body body: RequestBody): Call<HttpResult<String?>>

    //考试记录
    @POST("/exam/final/grade")
    fun result(@Body body: RequestBody): Call<HttpResult<String?>>

    //考试成绩确认
    @POST("/exam/confirm/grade")
    fun sure(@Body body: RequestBody): Call<HttpResult<String?>>

    //考试记录
    @POST("/exam/miss")
    fun lack(@Body body: RequestBody): Call<HttpResult<String?>>

    //异常日志上传
    @POST("/exam/error")
    fun uploadLog(@Body body: RequestBody): Flow<HttpResult<String?>>
}